import java.util.Random;
import java.util.ArrayList;

public class TheClass {
    private String name;
   ArrayList<Student> students;
    private ArrayList<Group> groups;

    public TheClass(String name){
        this.name = name;
        students = new ArrayList<>() ;
        groups = new ArrayList<>();
    }
    public void addGroup(Group group){
        groups.add(group);
    }
    public void addStudent(Student student) {
        students.add(student);
    }

    public Student selectStudent() {
        Random random = new Random();
        int index = random.nextInt(students.size());
        return students.get(index);
    }

    public Group selectGroup() {
        Random random = new Random();
        int index = random.nextInt(groups.size());
        return groups.get(index);
    }
}
